package com.study.injection;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @Author chenyeqing
 * @Date 2021/11/1 21:52
 */
@PropertySource("classpath:init.properties")
@Component
@Data
public class Category {

    @Value("${id}")
    private static Integer id;

    @Value("${name}")
    private String name;
}
